package C;

import java.util.Arrays;
import java.util.Scanner;
import java.util.StringJoiner;

public class C5My {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[][] students= new int[n][3];
        for (int i=0;i<students.length;i++) {
            students[i][0] = sc.nextInt();
        }
        for (int i=0;i< students.length;i++) {
            students[i][1] = sc.nextInt();
            students[i][2] = i+1;
        }

        getResult(students);




    }

    public static void getResult(int[][] students){
        Arrays.sort(students,(a,b)->{
            return a[0]!=b[0]?a[0]-b[0]:a[1]!=b[1]?a[1]-b[1]:a[2]-b[2];
        });

//        Arrays.sort(students,(a,b)->{
//            if (a[0] != b[0]) {
//                return a[0] - b[0];
//            }
//            if (a[1] != b[1]) {
//                return a[1]-b[1];
//            }
//            return a[2]-b[2];
//        });

        StringJoiner sj = new StringJoiner(" ");
        for (int i=0;i<students.length;i++) {
            sj.add(String.valueOf(students[i][2]));
        }
        System.out.println(sj.toString());

//        for (int i=0;i<students.length;i++) {
//            System.out.print(students[i][2]+" ");
//        }
    }
}
